using System.Collections.Generic;
using Sanelib.Dto.Enumerations;

namespace Common.Enumerations
{
    public class Permission : Enumeration<Permission>
    {
        public IList<Role> Roles { get; set; }

        public Permission(string value, string displayName, int displayOrder, params Role[] roles)
            : base(value, displayName, displayOrder)
        {
            Roles = roles;
        }

        public static readonly Permission DeleteRecord = new Permission("DR", "Delete Record", 0, Role.ApplicationOwner);
        public static readonly Permission UpdateRecord = new Permission("UR", "Update Record", 1, Role.ApplicationOwner);
        public static readonly Permission AddConsumer = new Permission("AME", "Add Member", 2, Role.ApplicationOwner);
        public static readonly Permission AccessAdminMenu = new Permission("AM", "Admin Menu", 3, Role.ApplicationOwner);
        public static readonly Permission AccessOtherMenu = new Permission("OM", "Other Menu", 4, Role.ViewOnlyUser);
        public static readonly Permission MemberArea = new Permission("MA", "Member Area", 4, Role.Member);
    }
}